package com.cqsw.mapper;

import cn.hutool.core.util.PageUtil;
import cn.hutool.db.Page;
import com.cqsw.entity.Role;
import com.cqsw.entity.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Classname UserMapper
 * @Description TODO
 * @Date 2022/6/13 13:11
 * @Created by Smith.Liu
 */
@Mapper
public interface UserMapper {
    List<Users> getAllUser();

    int insertUser(Users users);

    int deleteUser(@Param("id") Integer id);

    int updateUser(Users user);

    Users userIdGetForRoleInfo(@Param("id") Integer id);

    List<Role> getRoleForUser(@Param("id")Integer id);

    Users selectByUsername(@Param("username") String username);
}
